Misc (Разное)
Функции
- gdialog_get_barter_mod
- get_kill_counter
- get_metarule_table
- get_uptime
- get_year
- metarule_exist
- mod_kill_counter
- npc_engine_level_up
- set_pipboy_available
- set_quest_failure_value
- set_rest_heal_time
- set_rest_mode
- sneak_success
gdialog_get_barter_mod
int gdialog_get_barter_mod
get_kill_counter
int get_kill_counter(int critterType)
get_metarule_table
funcX
array get_metarule_table
Returns names of all currently available scripting functions.
get_uptime
int get_uptime()
Just a wrapper around the windows GetTickCount() function. It’s useful for making time fade effects in shaders, since they already have access to the current tick count.
get_year
int get_year
metarule_exist
funcX
bool metarule_exist(string metaruleName)
Returns True if the specified name of metarule (sfall_funcX) function exists in the current version of sfall.
mod_kill_counter
void mod_kill_counter(int critterType, int amount)
npc_engine_level_up
funcX
void npc_engine_level_up(bool toggle)
Enables/disables the engine function that increases the level of party members in the player leveling process. If the engine function is disabled, the process of leveling up party members should be performed by script functions.
set_pipboy_available
void set_pipboy_available(int available)
Will only accept 0 or 1 as an argument. Using any other value will cause the function to have no effect. Use 0 to disable the pipboy, and 1 to enable it.
set_quest_failure_value
funcX
void sfall_func2("set_quest_failure_value", int gvarNumber, int thresholdValue)
- sets the threshold value (failure_threshold) for the quest at which the quest will be considered failed (its description in the pipboy will be crossed out and colored red)
gvarNumber
: the number of the global variable controlling the questthresholdValue
: the value of the global variable at which the quest is counted as a failure
set_rest_heal_time
funcX
void set_rest_heal_time(int time)
Sets the time interval in minutes for healing during resting. The default is 180. Note: The interval will be reset each time the player reloads the game.
set_rest_mode
funcX
void set_rest_mode(int flags)
Sets the bit flags for the rest mode (see RESTMODE_*
constants in sfall.h
). Passing 0 will reset the rest mode. It will also be reset each time the player reloads the game.
sneak_success
int sneak_success
Returns 1 if last sneak attempt (roll against skill) was successful, 0 otherwise. This calls an internal engine function which is used to determine the perception range of critters (which you can override using HOOK_WITHINPERCEPTION
).